package com.bill.springcloud.hystrix.feign.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @fileName: HelloFeignService.java
 * @author: bin.li01
 * @date: 2018/2/1 10:47
 * @version: v1.0.0
 */
@FeignClient(value = "eureka-client",fallback = HelloFeignServiceImpl.class)
public interface HelloFeignService {

    /**
     * 调用已经注册到服务（eureka-server）的eureka-client应用中的接口
     * @param name
     * @return
     */
    @RequestMapping(value = "hello",method = RequestMethod.GET)
    String helloFromEurekaClient(@RequestParam(value = "name") String name);

}
